package com.zhc.dejingapi.controller;


import com.zhc.dejingapi.common.result.Result;
import com.zhc.dejingapi.entity.QingZbProcessrouteEntity;
import com.zhc.dejingapi.entity.vo.ProcessRouteVo;
import com.zhc.dejingapi.service.QingZbProcessrouteService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zhc
 * @since 2024-09-11
 */
@RestController
@RequestMapping("/qing-zb-processroute-entity")
@CrossOrigin
public class QingZbProcessrouteController {

    @Resource
    private QingZbProcessrouteService qingZbProcessrouteService;

    @PostMapping("addProcessRoute")
    public Result addProcessRoute(@RequestBody ProcessRouteVo processRouteVo){
        return qingZbProcessrouteService.addProcessRoute(processRouteVo);
    }

    @PostMapping("selectProcessRoute")
    public Result selectProcessRoute(@RequestBody QingZbProcessrouteEntity qingZbProcessrouteEntity){
        return qingZbProcessrouteService.selectProcessRoute(qingZbProcessrouteEntity);
    }

    @PostMapping("selectProcessWithRoute/{processRouteNum}")
    public Result selectProcessWithRoute(@PathVariable String processRouteNum){
        return qingZbProcessrouteService.selectProcessWithRoute(processRouteNum);
    }

    @PostMapping("deleteProcessWithRoute/{processRouteNum}")
    public Result deleteProcessRoute(@PathVariable String processRouteNum){
        return qingZbProcessrouteService.deleteProcessRoute(processRouteNum);
    }
}
